<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SHOP 管理中心 - 商品分类 </title>
    <base href="__STATIC__/hou/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
</head>
<body>

<h1>
<span class="action-span"><a href="{:url('Cate/adds')}">添加分类</a></span>
<span class="action-span1"><a href="index.php?act=main">SHOP 管理中心</a> </span><span id="search_id" class="action-span1"> - 商品分类 </span>
<div style="clear:both"></div>
</h1>

<form method="post" action="" name="listForm">
<!-- start ad position list -->
	<div class="list-div" id="listDiv">
		<table width="100%" cellspacing="1" cellpadding="2" id="list-table">
			<tbody>
				<tr>
					<th>分类名称</th>
					<th>导航栏</th>
					<th>是否显示</th>
					<th>等级分级</th>
					<th>排序</th>
					<th>操作</th>
				</tr>
				{foreach name="data" item="val"}
				<tr align="center" class="0" class="{$val.parent_id}" catid="{$val.cat_id}">
					<td align="left" class="first-cell">
						{for start="0" end="$val.level"}
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						{/for}
						<img src="images/menu_minus.gif" class="dian" width="9" height="9" border="0" style="margin-left:0em">
						<span><a href="#">{$val.cat_name}</a></span>
					 </td>
					<td width="15%">
						{eq name="val.is_nav" value="1"}
						<img src="images/yes.gif" ></td>
						{else/}
						<img src="images/no.gif"></td>
						{/eq}

					<td width="15%">
						{eq name="val.is_show" value="1"}
						<img src="images/yes.gif"></td>
						{else/}
						<img src="images/no.gif"></td>
						{/eq}

					<td><span title="点击修改内容" style="">{$val.level}</span></td>
					<td width="10%" align="right"><span onclick="listTable.edit(this, 'edit_sort_order', 1)" title="点击修改内容" style="">50</span></td>
					<td width="24%" align="center">
						<a href="category.php?act=move&amp;cat_id=1">转移商品</a> |
						<a href="__URL__/change?catid={$val.cat_id}">编辑</a> |
						<a href="javascript:;" name="del"  did="{$val.cat_id}" title="移除">移除</a>
					</td>
				</tr>
				{/foreach}
	</tbody>
  </table>
</div>
</form>
</body>
</html>
<script src="__STATIC__/qian/js/jquery-1.11.1.min.js"></script>
<script>
	$(document).on('click','.dian',function(){

	}
	$(document).on('click','.dian',function(){
//		$(this).parents('tr').nextAll().toggle();
		catid=$(this).parents('tr').attr('catid');//得到当前选中的id
		$('[class='+catid+']').toggle();
//		sonid=$('[class='+catid+']').attr(catid);
//		$('[class='+sonid+']').toggle();
	})
</script>